package cn.iocoder.yudao.module.erp.service.finance;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.cashFlow.ErpFinanceCashFlowVO;
import cn.iocoder.yudao.module.erp.dal.mysql.finance.CashFlowMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.List;

@Service
@Validated
public class CashFlowServiceImpl implements CashFlowService {
    @Resource
    private CashFlowMapper cashFlowMapper;

    @Override
    public List<ErpFinanceCashFlowVO> getCashFlowList() {
        return BeanUtils.toBean(cashFlowMapper.selectList(), ErpFinanceCashFlowVO.class);
    }

    @Override
    public String getCashFlowByID(long id) {
        System.out.println(cashFlowMapper.selectById(id).getName());
        return cashFlowMapper.selectById(id).getName();
    }
}
